package com.zhoukx.factory.absfactory.pizzstore.order;

import com.zhoukx.factory.absfactory.pizzstore.pizze.*;

/**
 * @ClassName LDFactory
 * @Description: 伦敦子工厂
 * @Author zhoukx
 * @Date 2020/8/6
 **/
// 工厂子类
public class LDFactory implements AbsFactory {
    @Override
    public Pizza createPizeea(String orderType) {
        System.out.println("使用的是抽象工厂模式------");

        Pizza pizza = null;
        if (orderType.equals("cheese")){
            pizza = new LDCheesePizza();
        }else if(orderType.equals("pepper")){
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
